﻿
(function ($) {

    var setdrag = function ($addedDiv) {
        var line

        var alllines = $addedDiv.attrFunctions('l', "all");


        for (var i = 0; i < alllines.length; i++) {
            var line = alllines[i];
            var start = line.getStart();
            var end = line.getEnd();
            if (start) { 
                if (start[0] == $addedDiv[0]) {
                   
                    line.start(start);
                }
            }
            if (end) {
                if (end[0] == $addedDiv[0]) {
                    
                    line.end(end);
                }
            }

        }
    }
    jQuery.fn.setdragFunction = function (options) {
        settings = jQuery.extend({
            
        }, options);
        setdrag($(this));
        return this;
    };
})(jQuery);